import java.io.*;

public class TestWriter{
	public static void main(String args[]){
		
		String fileName = "output.ics";
		String timeZone = "Pacific/Honolulu";
		String dtStart = "20130814T200000Z";
		String dtEnd = "20130814T230000Z";
		String location = "Hamilton Library";
		String summary = "Study for Exam";
	
		PrintWriter fileOut = null;
		try{
			fileOut = new PrintWriter(fileName);
		}
		catch (FileNotFoundException exception){
			System.out.println("Error");
		}
		
		fileOut.println("BEGIN:VCALENDAR");
		fileOut.println("PRODID:-//Google Inc//Google Calendar 70.9054//EN");
		fileOut.println("VERSION:2.0");
		fileOut.println("CALSCALE:GREGORIAN");
		fileOut.println("METHOD:PUBLISH");
		fileOut.println("X-WR-CALNAME:" + fileName); //filename variable
		fileOut.println("X-WR-TIMEZONE:" + timeZone); //timezone variable
		fileOut.println("X-WR-CALDESC:");
		fileOut.println("BEGIN:VEVENT");
		fileOut.println("DTSTART:" + dtStart); //start variable
		fileOut.println("DTEND:" + dtEnd); //end variable
		fileOut.println("DTSTAMP:20130714T232124Z");
		fileOut.println("UID:qbjehptlhjgn14igah7l66mcn4@google.com");
		fileOut.println("CREATED:20130714T231839Z");
		fileOut.println("DESCRIPTION:");
		fileOut.println("LAST-MODIFIED:20130714T231928Z");
		fileOut.println("LOCATION:" + location); //location variable
		fileOut.println("SEQUENCE:1");
		fileOut.println("STATUS:CONFIRMED");
		fileOut.println("SUMMARY:" + summary); //summary variable
		fileOut.println("TRANSP:TRANSPARENT");
		fileOut.println("END:VEVENT");
		fileOut.println("END:VCALENDAR");

		fileOut.close();
	}
}